CMAKE_MINIMUM_REQUIRED(VERSION 3.14)

include_directories(
    ${PROJECT_SOURCE_DIR}
    ${PROJECT_SOURCE_DIR}/framework/core
    ${PROJECT_SOURCE_DIR}/framework/inc/exinc
    ${PROJECT_SOURCE_DIR}/framework/inc/osinc
    ${PROJECT_SOURCE_DIR}/framework/src/osimp
    ${PROJECT_SOURCE_DIR}/deps/idl
    generated
)
LINK_DIRECTORIES(
    ${PROJECT_SOURCE_DIR}/deps/fdbus/build
    ${PROJECT_SOURCE_DIR}/deps/protobuf/build
    ${PROJECT_BINARY_DIR}/deps/protobuf/cmake
)

add_custom_target(
    genidl4Dispctrl
    COMMAND "${PROJECT_SOURCE_DIR}/business/Dispctrl/genidl.sh"
)


set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/home/bin)
add_executable(testDispctrl BeansExtern.cpp tests/testClient.cpp servlet/DispctrlServletImp.cpp generated/IDispctrlServlet.cpp)

target_link_libraries(testDispctrl core dl eximp osimp common_base)

add_dependencies(testDispctrl genidl4Dispctrl)
